package com.wisely.highlight_spring4.ch3.aware;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.core.io.ResourceLoader;

public class Main {
	public static void main(String[] args) {
		
		AnnotationConfigApplicationContext context =
                new AnnotationConfigApplicationContext(AwareConfig.class);
		
		ApplicationContext it = AwareService.getIt();
		
		AwareService awareService = context.getBean(AwareService.class);
		awareService.outputResult();
		
		System.out.println("wait..............");
		
		awareService = it.getBean(AwareService.class);
		awareService.outputResult();
		
		context.close();
	}
}
